﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SimpleVisio
{
    public class AppConfigReader
    {
        public string STENCILDIR { get; set; }
        public string TEMPLATEDIR { get; set; }
        public string LOGFILE { get; set; }
        public string PROJECTDIR { get; set; }
        public string ADVANCEDDIR { get; set; }

        
        public string containerShape { get; set; }

        public string STARTTEMPLATE { get; set; }
        public string BASICVSS { get; set; }


        public string InputXML { get; set; }

        public bool CustomXY { get; set; }


        public AppConfigReader()
        {
            var appSettings = ConfigurationManager.AppSettings;
            STENCILDIR = appSettings["Stencils"].ToString();
            TEMPLATEDIR = appSettings["Templates"].ToString();
            LOGFILE = appSettings["LogFile"].ToString();
            PROJECTDIR = appSettings["Project"].ToString();
            ADVANCEDDIR = appSettings["Advanced"].ToString();
            containerShape = appSettings["ContainerShape"].ToString();
            STARTTEMPLATE = appSettings["StartTemplate"].ToString();
            BASICVSS = appSettings["BasicStyleSheet"].ToString();

            InputXML = appSettings["InputXML"].ToString();
            string sCustomXY = appSettings["CustomXY"].ToString().ToLower();
            CustomXY = sCustomXY.Equals("true");

        }
    }
}
